using System;
using FlickrNet;

namespace FlickrShots.Framework.flickr
{
	public class User
	{
		private FlickrNet.User _flickrUser;
		private Connectr _connection;

		public static readonly User NullUser = new User(null);

		internal User(FlickrNet.User user)
		{
		    _flickrUser = user;
			_connection = new Connectr();
		}

		public string ID
		{
			get { return _flickrUser != null ? _flickrUser.UserId : null; }
		}

		public string Name
		{
			get { return _flickrUser != null ? _flickrUser.UserName : null; }
		}

	    public PhotoCollection GetContactPhotoCollection()
	    {
	        throw new NotImplementedException();
	    }

	    public PhotoCollection GetPhotoCollection()
	    {
	        return _connection.Flickr.PeopleGetPublicPhotos(ID).PhotoCollection;
	    }
	}
}
